-
Notifications
You must be signed in to change notification settings - Fork 121
Product List: Replace full product objects with simplified objects #15966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ead-can-cause' into woomob-619-product-list-update
|
|
…ead-can-cause' into woomob-619-product-list-update
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Products, variations, bundles look fine.
| func listItem(at indexPath: IndexPath) -> T.ListItemType { | ||
| return controller.object(at: indexPath).toListItem() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…ead-can-cause' into woomob-619-product-list-update
…ead-can-cause' into woomob-619-product-list-update
Generated by 🚫 Danger |
…ead-can-cause' into woomob-619-product-list-update
|
@RafaelKayumov I also added changes in this PR to use a separate type for product list on the view layer. Due to complications with batch product update, I added a workaround to get list items for the product list without using the generic results controller as discussed in #15959. Please take another look when you can. cc @jaclync |

Part of WOOMOB-619
Description
This PR continues the work in #15959 to improve the performance on the product list by loading simplified product objects instead of full ones.
Changes include:
ProductListItemwith new stock-related properties needed for displaying on product list items.selectFirstProductIfAvailablein product list to fetch full object for only the item at first index, not the whole list.Some helpers added:
toListItemextension method for Product to allow product search list and paginated list selector to continue working with the full objects. This is to keep the scope of this PR small.createStockTexta String extension to be reusable across different types, not justProductFormDataModel.Testing steps
Testing information
Tested and confirmed on simulator iPhone 16 iOS 18.4.
Screenshots
No UI changes.
RELEASE-NOTES.txtif necessary.